package com.example.erp.service;

import java.time.LocalDateTime;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

/**
 * 自定义服务
 */
@Service
public class MathService {

	@Tool(description = "计算两个数的和")
	public Integer add(@ToolParam(description = "第一个参数") int a, @ToolParam(description = "第二个参数") int b) {
		return a + b;
	}

	@Tool(description = "获取当前时间")
	public LocalDateTime getCurrentTime() {
		return LocalDateTime.now();
	}

}
